package com.situ.stl.service.impl;

import com.situ.stl.dao.ChartsMapper;
import com.situ.stl.service.ChartsService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Service
@RequiredArgsConstructor
public class ChartsServiceImpl implements ChartsService {
    private final ChartsMapper chartsMapper;

    @Override
    public List getCourseCount(Date date) {
        return chartsMapper.selectCourseCount(date);
    }

    @Override
    public List getReserveCount(Date date) {
        return chartsMapper.selectReserveCount(date);
    }

    @Override
    public List getCoachCount(Date date) {
        return chartsMapper.selectCoachCount(date);
    }

    @Override
    public List getMemberCount(Date date) {
        return chartsMapper.selectMemberCount(date);
    }

    @Override
    public List getHotCourse(Date date) {
        return chartsMapper.selectCourseOrderByReserve(date);
    }

    @Override
    public List getHotCoach(Date date) {
        return chartsMapper.selectCoachOrderByReserve(date);
    }

    @Override
    public Map<String, Object> getMemberTotal() {
        return chartsMapper.selectMemberTotal();
    }

    @Override
    public Map<String, Object> getCourseTotal() {
        return chartsMapper.selectCourseTotal();
    }

    @Override
    public Map<String, Object> getCoachTotal() {
        return chartsMapper.selectCocahTotal();
    }

    @Override
    public Map<String, Object> getReserveTotal() {
        return chartsMapper.selectReserveTotal();
    }
}
